package com.labot.dao;

import java.util.Date;
import java.util.List;

import com.labot.model.audit.Audit;
import com.labot.types.AuditEventType;
import com.labot.types.AuditType;

/**
 * @author Ing. Enrique Barbeito
 */
public interface AuditDao extends GenericDao<Audit, Long> {

    public List<Audit> getAll();
    
    public Audit save(Audit audit);
    
    /**
     * Exacto
     * @param event
     * @param type
     * @param executionPlace
     * @param userName
     * @param raw
     * @param from
     * @param to
     * @return
     */
    public List<Audit> getBy(AuditEventType event, 
    		                 AuditType type, 
    		                 String executionPlace, 
    		                 String userName,
    		                 String raw,
    		                 Date from, 
    		                 Date to);
    
    /**
     * Similiar
     * @param event
     * @param type
     * @param executionPlace
     * @param userName
     * @param raw
     * @param from
     * @param to
     * @return
     */
    public List<Audit> getBy(String event, 
    						 String type, 
    						 String executionPlace, 
    						 String userName, 
    						 String raw, 
    						 Date from, 
    						 Date to);
    
    public Audit log(
    				AuditEventType event,
    				AuditType auditType,
    				String className,
    				String userName,
    				String raw
    		);
    
}
